﻿#region << 文件说明 >>
/*----------------------------------------------------------------
 * 命名空间：Vampirewal.Core.FlowEngine.Design
 * 唯一标识：e28af2c7-1f7f-4435-b06c-96984c15ffc0
 * 文件名：VampirewalDesignService
 * 
 * 创建者：杨程
 * 电子邮箱：235160615@qq.com
 * 创建时间：2023/10/27 17:33:19
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 文件说明 >>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Vampirewal.Core.FlowEngine;

/// <summary>
/// 流程引擎设计
/// </summary>
public class VampirewalDesignService : IVampirewalDesignService
{
    /// <summary>
    ///
    /// </summary>
    public VampirewalDesignService()
    {
        Flows = new List<Flow>();
    }

    /// <summary>
    /// 流程集合
    /// </summary>
    public List<Flow> Flows { get; set; }

    /// <summary>
    /// 构建流程
    /// </summary>
    /// <param name="builder"></param>
    public void FlowBuilder(Action<IVampirewalFlowBuilder> builder)
    {
        VampirewalFlowBuilder _builder = new VampirewalFlowBuilder();
        builder.Invoke(_builder);

        Flows.Add(_builder.FlowInfo);
    }
}